package com.seehope.bit;

public class BitDemo1 {

	public static void main(String[] args) {
		int A = 60; 
		int B = 13; 
		int C = 0;
		C = A & B; 
		System.out.println("A & B = " + C);
		C = A | B;
		System.out.println("A | B = " + C);
		C = A ^ B; 
		System.out.println("A ^ B = " + C);
		C = ~A; 
		System.out.println("~A = " + C);
		C = A << 2; 
		System.out.println("A << 2 = " + C);
		C = A >> 2; 
		System.out.println("A >> 2  = " + C);
		C = -A >> 2;
		System.out.println("-A >> 2  = " + C);
		C = A >>> 2; 
		System.out.println("A >>> 2 = " + C);
		C = -A >>> 2; 
		System.out.println("-A >>> 2 = " + C);
	}


}
